﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;

public partial class AdminCMS_tab_Admin_Add : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }

    protected void btn_submit_Click(object sender, EventArgs e)
    {
        DataEntity.tab_Admin t = new DataEntity.tab_Admin();
        t.adm_RoleType = "admin";
        t.adm_RealName = Convert.ToString(txt_RealName.Text);
        t.adm_Question = Convert.ToString(txt_Question.Text);
        t.adm_LoginUser = Convert.ToString(txt_LoginUser.Text);
        t.adm_LoginPass = UIMethod.GetMD5(txt_LoginPass.Text);
        t.adm_Email = Convert.ToString(txt_Email.Text);
        t.adm_Answer = Convert.ToString(txt_Answer.Text);
        t.Insert();

        StringBuilder sb = new StringBuilder();
        
        UIMethod.Confirm("添加成功，继续添加吗？", "location = '" + Request.Path + sb.ToString() +
            "';", "location = 'tab_Admin_List.aspx" + sb.ToString() + "';");
    }
}
